<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="./WEB-INF/Templates/templateProjeto.xhtml">
        <!--este é o que fica lá em cima, na abinha do seu navegador favorito-->
        <ui:define name="titulo">Cadastro de prefeituras</ui:define>
        <!--Este é o título que fica logo antes do texto em si-->
        <ui:define name="tituloH1">Cadastro de prefeitura</ui:define>
        <ui:define name="pagLinda">

            <h:form>

                <h:messages layout="list" style="color: darkred"/>

                <h:panelGrid columns="2">
                    <b>Numero CNPJ</b>
                    <h:inputText id="numCnpj" value="#{managedPrefeitura.prefeitura.cnpj}" label="Numero CNPJ">
                        <f:validateRequired />
                        <f:validator validatorId="validatorCnpj"/>
                    </h:inputText>

                    <b>Nome da prefeitura</b>
                    <h:inputText id="nomPref" value="#{managedPrefeitura.prefeitura.nome}" label="Nome da prefeitura">
                        <f:validateRequired />
                        <f:validateLength maximum="30"/>
                    </h:inputText>

                    <b>Numero do municipio - INSIRA O VALIDATOR DO MUNICIPIO AQUI </b>
                    <h:inputText id="municipio" value="#{managedPrefeitura.prefeitura.numeroMunicipio}" label="Municipio">
                        <f:validateRequired />
                    </h:inputText>

                    <b>Unidade Federativa</b>
                    <h:selectOneMenu id="UF" value="#{managedPrefeitura.prefeitura.uf}">
                         <f:selectItem/>
                         <f:selectItem itemLabel="AC" itemValue="AC" />
                         <f:selectItem itemLabel="AL" itemValue="AL" />
                         <f:selectItem itemLabel="AP" itemValue="AP" />
                         <f:selectItem itemLabel="AM" itemValue="AM" />
                         <f:selectItem itemLabel="BA" itemValue="BA" />
                         <f:selectItem itemLabel="CE" itemValue="CE" />
                         <f:selectItem itemLabel="DF" itemValue="DF" />
                         <f:selectItem itemLabel="ES" itemValue="ES" />
                         <f:selectItem itemLabel="GO" itemValue="GO" />
                         <f:selectItem itemLabel="MA" itemValue="MA" />
                         <f:selectItem itemLabel="MG" itemValue="MG" />
                         <f:selectItem itemLabel="MS" itemValue="MS" />
                         <f:selectItem itemLabel="MT" itemValue="MT" />
                         <f:selectItem itemLabel="PA" itemValue="PA" />
                         <f:selectItem itemLabel="PB" itemValue="PB" />
                         <f:selectItem itemLabel="PE" itemValue="PE" />
                         <f:selectItem itemLabel="PI" itemValue="PI" />
                         <f:selectItem itemLabel="PR" itemValue="PR" />
                         <f:selectItem itemLabel="RJ" itemValue="RJ" />
                         <f:selectItem itemLabel="RN" itemValue="RN" />
                         <f:selectItem itemLabel="RO" itemValue="RO" />
                         <f:selectItem itemLabel="RR" itemValue="RR" />
                         <f:selectItem itemLabel="RS" itemValue="RS" />
                         <f:selectItem itemLabel="SC" itemValue="SC" />
                         <f:selectItem itemLabel="SE" itemValue="SE" />
                         <f:selectItem itemLabel="SP" itemValue="SP" />
                         <f:selectItem itemLabel="TO" itemValue="TO" />
                    </h:selectOneMenu>

                </h:panelGrid>
                <h:commandButton value="Enviar" action="#{managedPrefeitura.submeter}" />
                
            </h:form>
        </ui:define>
    </ui:composition>
</html>
